package generator.mapper;

import generator.domain.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 李展鹏
* @description 针对表【t_sys_user(系统用户)】的数据库操作Mapper
* @createDate 2024-04-25 13:57:11
* @Entity generator.domain.SysUser
*/
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
    /**
     * 用户登录
     * @param account
     * @return
     */
    public SysUser queryByAccountAndPwd(@Param("account") String account);

    /**
     * 条件查询
     * @param queryRealName
     * @param queryRoleId
     * @return
     */
    public int getUserCount(@Param("queryRealName") String queryRealName,@Param("queryRoleId") Integer queryRoleId);

    /**
     * 分页
     * @param queryRealName
     * @param queryRoleId
     * @param pageIndex
     * @param pageSize
     * @return
     */
    public List<SysUser> getUserList(@Param("queryRealName") String queryRealName,@Param("queryRoleId") Integer queryRoleId,@Param("pageIndex") Integer pageIndex,@Param("pageSize") Integer pageSize);

    /**
     * 添加用户
     * @param sysUser
     * @return
     */
    public Boolean add(SysUser sysUser);

    /**
     * 根据用户ID查询用户详情
     * @param id
     * @return
     */
    public SysUser getUserById(@Param("id") Integer id);

    /**
     * 修改用户信息
     * @param sysUser
     * @return
     */
    public Boolean getUpdateUserId(SysUser sysUser);

}



